package net.baiken.yuki;

import java.awt.Component;
import java.awt.MenuItem;
import java.awt.PopupMenu;

import net.baiken.commons.Messages;
import net.baiken.messages.YukiMessageKeys;
import net.baiken.yuki.svn.SVNServer;

public class YukiMenu extends PopupMenu {
	private MenuItem startSVNMenuItem;
	private MenuItem stopSVNMenuItem;
	private MenuItem aboutMenuItem;
	private MenuItem exitMenuItem;

	public YukiMenu() {
		initUI();
	}

	private void initUI() {
		startSVNMenuItem = new MenuItem(Messages.getInstance().getString(
				YukiMessageKeys.MenuItem.Start));
		startSVNMenuItem.setActionCommand(YukiCommand.StartSVN.toString());
		add(startSVNMenuItem);

		stopSVNMenuItem = new MenuItem(Messages.getInstance().getString(
				YukiMessageKeys.MenuItem.Stop));
		stopSVNMenuItem.setActionCommand(YukiCommand.StopSVN.toString());
		add(stopSVNMenuItem);

		addSeparator();

		aboutMenuItem = new MenuItem(Messages.getInstance().getString(
				YukiMessageKeys.MenuItem.About));
		aboutMenuItem.setActionCommand(YukiCommand.About.toString());
		add(aboutMenuItem);
		
		addSeparator();

		exitMenuItem = new MenuItem(Messages.getInstance().getString(
				YukiMessageKeys.MenuItem.Exit));
		exitMenuItem.setActionCommand(YukiCommand.Exit.toString());
		add(exitMenuItem);

	}

	public MenuItem getStartSVNMenuItem() {
		return startSVNMenuItem;
	}

	public MenuItem getStopSVNMenuItem() {
		return stopSVNMenuItem;
	}

	public MenuItem getExitMenuItem() {
		return exitMenuItem;
	}

}
